package cn.zyl.common.redis.api;

import cn.zyl.demo.common.boot.beans.ResBody;
import cn.zyl.demo.common.boot.tools.ResBodyTool;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

/**
 * BaseApiController类说明:
 *
 * @author wsz
 * @version v1.0
 * @date 2020-07-31
 */
@RestController
@RequestMapping("/apis")
public class RedisApiController{

    /**
     * 请求根路径
     * @return 字符串
     */
    @RequestMapping("")
    public String index(){ return "Hello Spring Boot Redis!"; }
    /**
     * 获取名称
     * @return 名称字符串
     */
    @RequestMapping(value = "name",method = RequestMethod.GET)
    public ResBody<String> name(){ return ResBodyTool.success("redis"); }
}
